package com.rayinhz.bet.response;

public class CustomException extends RuntimeException {
	private static final long	serialVersionUID	= 4284673872108978590L;
    private String            msg;
	private Exception			exception;
	private Object				tag;

	public CustomException() {
		
	}

	public static CustomException fail(String msg, Object tag) {
		CustomException customException = new CustomException();
		customException.setMsg(msg);
		customException.setTag(tag);
		return customException;
	}
	
	public static CustomException error(String msg, Object tag, Exception exception) {
		CustomException customException = new CustomException();
		customException.setMsg(msg);
		customException.setTag(tag);
		customException.setException(customException);
		return customException;
	}

	public String getMsg() {
		return msg;
	}

	private void setMsg(String msg) {
		this.msg = msg;
	}

	public Exception getException() {
		return exception;
	}

	private void setException(Exception exception) {
		this.exception = exception;
	}

	public Object getTag() {
		return tag;
	}

	private void setTag(Object tag) {
		this.tag = tag;
	}

}
